home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / ter12b.zip / TER12B._XE / UTILS.EXE / SCANMODE.DOC < prev    next >
Text File  |  1993-11-10  |  2KB  |  45 lines

  1. ScanMode is a program developed by Keld "HeartWare" Hansen. It scans
  2. through all modes on a VGA card and notes which modes are text modes and
  3. what their resolution is. It then saves this information in a file of the
  4. following format (PASCAL notation used):
  5.  
  6.                 RECORD
  7.                   Version       : BYTE          { Must be 6 }
  8.                   Modes         : ARRAY[1..n] OF RECORD
  9.                                                    ModeNo       : BYTE;
  10.                                                    Width        : BYTE;
  11.                                                    Height       : BYTE;
  12.                                                    CharWidth    : BYTE;
  13.                                                    ScanLines    : WORD
  14.                                                  END
  15.                 END
  16.  
  17. The CharWidth and ScanLines are set to zero by ScanMode and are only present
  18. in the file for future use.
  19.  
  20. To point to the file, a standard is enforced:
  21.     The environment variable MODEINFO is used to point to the file.
  22.     If the value of MODEINFO is a directory, then the file is called
  23.       MODEINFO.DAT in that directory.
  24.     If the value of MODEINFO is a file without a file type, then .DAT
  25.       is assumed.
  26.     If the value of MODEINFO points to an existing file, then that's it!
  27.  
  28. To switch into a specific text resolution, read the file, comparing the
  29. requested screen width and height to the values found in the record. When a
  30. match is found, you can switch into the mode specified by ModeNo and voilà,
  31. you are in a text mode with that resolution.
  32.  
  33. Please note, that Borland/Turbo Pascal doesn't recognize these extended
  34. text modes, and that if a person starts up a pascal program while being in
  35. one of these modes, then the initialization code in the CRT unit switches
  36. back into 80x25 (mode 3 or 7). Also note, that WRITE and WRITELN probably
  37. doesn't work in the extended text modes. You will need to do your own screen
  38. handling.
  39.  
  40. You are hereby granted an unlimited license to distribute this archive with
  41. your Public Domain programs, and the format of the file is released as Public
  42. Domain as well. If you want to distribute it as part of a shareware package,
  43. the only price I ask is a free registration of the program you want to send
  44. the SCANMODE archive with.
  45.